import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: () => import('@/views/Home.vue'),
    meta: {
      title: '首页',
      keepAlive: false, //此组件需要被缓存
      auth: true, //是否需要登录  所有关注医生需要登录才可以请求
    }
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/login/Login'),
    meta: {
      title: '登录',
      keepAlive: false, //此组件需要被缓存
      auth: true, //是否需要登录  所有关注医生需要登录才可以请求 }
    }
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
